home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / amac33.arc / RFRM22.QM < prev    next >
Text File  |  1991-04-28  |  58KB  |  1,258 lines

  1. *                              (RFRM22).QM
  2. *┌──────(INDEX) Macros to Reformat Blocks, Paragraphs and Documents ───────────┐
  3. *│                                                                Bytes
  4. *│^(c)  Replace "period space" w/ "period two_spaces" - DOCUMENT    44<change
  5. *│^(b)  Replace "period space" w/ "period two_spaces" - PARAGRAPHS  54<new
  6. *│@(F1) Right Justifies DOCUMENT                                   126
  7. *│@(F2) Right Justifies DOCUMENT, Screen preview                    14
  8. *│@(F4) Removes Right Justification from LINE or BLOCK              87
  9. *│@(F5) Removes Right Justification from DOCUMENT                   96
  10. *│@(F7) Deletes ALL BLANK lines in document                         23
  11. *│@(F8) Deletes all but single space BLANK lines in document        24
  12. *│
  13. *│@(1)  Adds asterisk and space in front of BLOCK                   27
  14. *│@(t)  Adds asterisk and space in front of BLOCK (Tim Farley)      44
  15. *│@(3)  Adds asterisk and space in front of BLOCK or PARAGRAPH      18
  16. *│@(6)  Adds asterisk and one space in column 1                     12
  17. *│@(5)  Deletes first two characters of line                        11
  18. *│@(4)  Deletes asterisk and one space in column 1                  25
  19. *│@(7)  Deletes asterisk and ALL space at beginning of line         17
  20. *│@(2)  Deletes asterisk and one space in front of BLOCK            11
  21. *│@(9)  COUNTS number of words in a document, words=letters/numbers 50
  22. *│@(0)  COUNTS number of words in a document, words sep. by spaces  85
  23. *│@(n)  COUNTS number of characters in a document                   95
  24. *│
  25. *│^(3_) Formats PARAGRAPH, fast and small                            8
  26. *│^(0_) Formats PARAGRAPH                                           60
  27. *│^(5_) Formats DOCUMENT with blank lines forming PARAGRAPHS        26
  28. *│^(8_) Formats QMAC txtfile BLOCK with asterisks in col. 1         61
  29. *│^(9_) Formats BLOCK.  Must position cursor at BLOCK begin         62
  30. *│^(7_) Formats Message Reader Paragraph     (Tim Farley)          132
  31. *│
  32. *│@(h)  Select Index item with cursor line, then <enter>.           47
  33. *│^(F9_)  Make a COMMA delimited file          (Sammy Mitchell)     37
  34. *│^(F10_)"Break apart" a COMMA delimited file  (Sammy Mitchell)     54
  35. *│
  36. *│(Index)          - How to locate macro or item below from Index using @h
  37. *│(Description)    - Reformat Macros
  38. *│(Macros)         - Reformat Macros
  39. *│(Other) Macros   - not included
  40. *│(Test) Paragraph To Reformat
  41. *│(Version) history
  42. *└────────[ be sure to leave at least one blank line at end of Index  ]────────┘
  43.  
  44.  
  45. * (Description):
  46.  
  47. * (RFRM22).QM are macros to reformat QEDIT blocks, paragraphs, and
  48. * documents.   Asterisks are also added and deleted in front of lines,
  49. * block, and paragraphs. Number of words and characters in a document
  50. * can also be counted. Comma delimited files can also be made and
  51. * "broken apart". Documents can formatted with right justification.
  52. *
  53. * If column width of the unformatted paragraphs and blocks are greater
  54. * than 80 columns, there must be enough blank lines for ^8, 9 & 0 to
  55. * paste the reformatted text back and not overlap unformatted areas.  In
  56. * other words, BE CAREFUL!
  57. *
  58. * For faster macro execution, replace "C:" with your ram drive.
  59. *
  60. * Insert and AutoIndent should be ON.
  61. *
  62. * (Other) Macros available: See ALLMACRO.INF.
  63.  
  64.  
  65. * (Index) Use;
  66. *
  67. * To locate a macro or item in this file, press @h, place the cursor
  68. * line on the desired item in the Index above, and press <enter>.
  69. * See BOOK15.QM for more details.
  70.  
  71. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  72.  
  73. * To BEGIN, just type "START RFRM" <Enter>. All pertinent files will be
  74. * loaded in the "Ring" for viewing, and RFRM22.MAC is read.
  75. * Alternatively, type "START RFRM 0" <Enter> and the disk copies of all
  76. * files in the "Ring" will be loaded ready for editing, saving time.
  77.  
  78.  
  79.  
  80. * (Macros):------------
  81.  
  82. * ┌───────────────────────────────────────────────────────────────────┐
  83. * │@(1) Place asterisk and space in column 1 in front of marked block │
  84. * └───────────────────────────────────────────────────────────────────┘
  85.  
  86. * To run, first mark and close a block with markblockbegin and
  87. * markblockend, markline, or dropanchor.  Blocks may contain blank
  88. * lines.  No column blocks, please.  The cursor may then be positioned
  89. * anywhere to run.  Press Alt and 1 at the same time.  An asterisk and a
  90. * space are placed in column 1 in front of the marked block only.
  91. * Marked block does NOT have to be a paragraph as in Alt_2.  If a block
  92. * is not marked, the cursor line is treated as a block, and an asterisk
  93. * and space are placed in column 1 the same as done with Alt_6.
  94.  
  95. @1 macrobegin
  96.         cut                             * cut block to scrap
  97.         editfile "$" return             * load $ (temp file)
  98.         quit                            * quit if in ring
  99.         editfile return                 * reload
  100.         paste                           * paste block to $
  101.  NEXT:                                  * come here until done
  102.         begline                         * stay in column 1
  103.         "* "                            * put asterisk space in col 1
  104.         cursordown                      * move down to next line
  105.  jtrue  NEXT:                           * if not done go to NEXT
  106.         begfile                         * go to begfile $
  107.         markblockbegin                  * get line 1 col 1 in block
  108.         copy                            * get block w/asterisks to scrap
  109.         quit                            * quit $
  110.         paste                           * put block back with asterisks
  111.  END:
  112. *
  113. * 27 bytes Tue  09-11-1990  19:28:29
  114.  
  115.  
  116. *┌──────────────────────────────────────┐
  117. *│ @(t) Alternate version of @1         │
  118. *└──────────────────────────────────────┘
  119.  
  120. * Here's an alternate version of Alt_1 from Tim Farley of SemWare that
  121. * seems to do the same thing.  It's faster, runs smoother, but is a
  122. * little larger if that's important.  I feel Tim came up with a better
  123. * way to do the same thing by using shiftright and fillblock.  Use
  124. * whichever you prefer that get's the job done for you.
  125. *
  126. * PN>I tried out two dBase commenting macros (from Tom Hogshead) last night.
  127. * PN>Neither of them does quite what I'm trying to achieve.
  128. * PN>
  129. * PN>What I need to do is comment out (i.e., put an asterisk in front of)
  130. * PN>each line in a blocked area.
  131. *
  132. * Here's an alternate version that uses the column marking ability,
  133. * ShiftRight, and FillBlock to do the job.
  134.  
  135. * TH>When marking a block with markblockbeg and markblockend, it adds one
  136. * TH>extra line to the bottom of the block.  Adding cursorup in line #11
  137. * TH>seems to get things to comment out the block as originally marked.
  138. * TH>Line blocks work OK.
  139. *
  140. * Hmmmm....I'll try it out.
  141. *
  142. * Ooops!  I guess I broke part of it in my last minute tweaking.
  143. *
  144. * Here is a version that works right in *all* cases, including a
  145. * single line:
  146.  
  147. *
  148. * DBASE COMMENT OUT MACRO
  149. *
  150. * Mark a block (doesn't matter if it is a char, line or column block).
  151. * Hit this key, and all the lines in the block will be commented out
  152. * with a "* " at the beginning of the line.
  153. *
  154. * After it is done, the block will be left marked as a line block,
  155. * and the cursor will be at the top of the block.
  156. *
  157. * Correctly detects case where you are in the middle of marking,
  158. * and also the case where no block is marked.
  159. *
  160. @t   MacroBegin
  161.      GotoBlockBeg              * Has block been closed?
  162.      GotoBlockEnd JTrue doit:  * if cursor moved, go ahead
  163.      MarkLine                  * no movement?  close block
  164.      GotoBlockEnd JFalse end:  * no movement?  no block!  quit.
  165.    doit:
  166.      EndLine BegLine           * <----NEW  for single line case
  167.      GotoBlockEnd              * Remember end of the block
  168.      GotoBlockBeg              * But go to beginning
  169.      MarkLine                  * Mark as line from here...
  170.      PrevPosition              * ...to the previous end of block.
  171.      MarkLine
  172.      BegLine                   * <----NEW  for column block case
  173.      ShiftRight ShiftRight     * Two characters over please
  174.      GotoBlockEnd              * Remember end of the block
  175.      GotoBlockBeg              * But go to beginning
  176.      MarkColumn                * Start marking a column
  177.      PrevPosition              * ...to end of previous block
  178.      BegLine                   * But only in column 1 of these lines
  179.      MarkColumn                * ...and finish marking.
  180.      FillBlock "*" Return      * Fill Column 1 with Stars!
  181.      GotoBlockEnd              * Remember end of the block
  182.      GotoBlockBeg              * But go to beginning
  183.      MarkLine
  184.      PrevPosition MarkLine     * Re-mark as a line block
  185.      GotoBlockBeg              * And leave us at the top.
  186.      Jump done:
  187.    end:
  188.      UnMarkBlock
  189.    done:
  190. *
  191. * 44 bytes Fri  08-24-1990  16:23:16 (line added TH )
  192.  
  193.  
  194. * Interestingly enough, since "*" is also a comment mark for QEdit
  195. * macros, you can use this to comment out lines in QEdit macros
  196. * too!
  197. *
  198. * There is one special case where this macro can do something odd,
  199. * and that is if you mark a single line as a block and comment it
  200. * out.   But since a single line can be commented out just by
  201. * hitting HOME and typing "*", I doubt that will be a problem.
  202. *
  203. * One nice side effect:  it leaves the lines marked as lines, so if
  204. * you want to *uncomment* them, just hit ShiftLeft twice.
  205. *
  206. * If you remove the comments and reformat, I think you can fit this
  207. * in QCONFIG.DAT.
  208. *
  209. * --Tim Farley
  210.  
  211.  
  212.  
  213. * ┌────────────────────────────────────────────────────────────────┐
  214. * │@(2)   Deletes asterisk and one space in front of marked block  │
  215. * └────────────────────────────────────────────────────────────────┘
  216. @2 macrobegin
  217.         gotoblockbeg                    * block?
  218.  JFalse END:                            * no block!  end
  219.         shiftleft shiftleft             * delete asterisk and space
  220.         unmarkblock                     * unmarkblock
  221.  END:
  222. *
  223. * 11 bytes Wed  08-22-1990  10:29:17
  224.  
  225.  
  226.  
  227.  
  228.  
  229. * ┌────────────────────────────────────────────────────────────────────┐
  230. * │@(3) Places an asterisk and space in front of block that IS a       │
  231. * │   paragraph and also in front of any paragraph that is NOT marked  │
  232. * │   as a block from the cursor to the end of the paragraph.          │
  233. * └────────────────────────────────────────────────────────────────────┘
  234. *
  235. * To run, first either mark a paragraph as a block with markblockbegin
  236. * and markblockend or position the cursor at the beginning of a
  237. * paragraph in column 1.  After loading the macro, press Alt and 3 at
  238. * the same time.  An asterisk and a space are placed in column 1 in
  239. * front of the block, or the paragraph from the cursor to the end
  240. * of the paragraph.  Remember, a paragraph is defined as having a
  241. * blank line at the beginning and end.
  242. *
  243. @3 macrobegin
  244.         gotoblockbeg                    * go to block begin
  245.  NEXT:                                  *
  246.         endline begline                 * end if line blank
  247.  jfalse END:                            * if line blank, go to end
  248.         "* "                            * put asterisk space in col 1
  249.         cursordown                      * move down to next line
  250.  jump  NEXT:                            * cycle until done
  251.  END:                                   *
  252. *
  253. * 18 bytes Mon  08-20-1990  22:19:35
  254.  
  255.  
  256.  
  257. * ┌───────────────────────────────────────────────────────────┐
  258. * │@(4) Deletes asterisk and SINGLE space at beginning of line│
  259. * └───────────────────────────────────────────────────────────┘
  260. * Use to remove asterisk and space inserted with Alt_6.  Lines with
  261. * no asterisk are not changed.
  262. *
  263. @4 macrobegin
  264.  START:
  265.         unmarkblock                     * unmark any blocks
  266.         begline                         * go to begline
  267.         markcolumn                      * mark it
  268.         cursorright                     * go to column 2
  269.         find "*"  return                * find asterisk space
  270.         "BL" return                     * back in block only
  271.  jfalse NEXT:                           * if found
  272.         delch                           * delete asterisk
  273.         delch                           * delete space
  274.   NEXT:                                 * come here if no astk in col 1
  275.         cursordown                      * down to next line
  276.         begline                         * begline
  277.         unmarkblock                     * unmark
  278. *
  279. * 25 bytes Tue  08-21-1990  13:30:16
  280.  
  281.  
  282.  
  283.  
  284. * ┌─────────────────────────────────────────────────────────┐
  285. * │@(5) Deletes first two characters at beginning of line   │
  286. * └─────────────────────────────────────────────────────────┘
  287.  
  288. * Lines without an asterisk will also have the first two spaces
  289. * deleted.  This macro is considerably smaller than @4 (11 vs 35 bytes),
  290. * but it is not quite as safe; @4 will NOT erase the first two
  291. * characters unless the first one is an asterisk.
  292.  
  293. @5 macrobegin
  294.  START:
  295.         unmarkblock                     * unmark
  296.         begline                         * go to begline
  297.         markline                        * mark line
  298.         shiftleft                       * shift char 1 out of block
  299.         shiftleft                       * shift char 2 out of block
  300.         unmarkblock                     * unmark line
  301.         cursordown                      * down to next line
  302. *
  303. * 11 bytes Tue  09-11-1990  17:33:17
  304.  
  305.  
  306.  
  307. * ┌──────────────────────────────────────────────────────┐
  308. * │@(6) Adds asterisk and one space at beginning of line │
  309. * └──────────────────────────────────────────────────────┘
  310. * Useful in preparing txtfiles for QMAC.  To run, just press Alt_6 and an
  311. * aste isk and blank space are inserted in column 1 and 2 in front of
  312. * any other text on the line.  Use Alt_4 or 5 to remove asterisk and
  313. * space inserted with this macro.
  314. *
  315. @6  macrobegin
  316.         unmarkblock
  317.         begline
  318.         "* "
  319.         cursordown
  320.         begline
  321. *
  322. * 12 bytes Mon  07-30-1990  11:03:14
  323.  
  324.  
  325.  
  326.  
  327. * ┌───────────────────────────────────────────────────────────┐
  328. * │@(7) Deletes asterisk and any space at beginning of line   │
  329. * └───────────────────────────────────────────────────────────┘
  330. * To run, press Alt_7, and the asterisk in column 1 on the cursorline
  331. * and all space up to the first word on the line is deleted.  This
  332. * macro erases too much if there are two asterisks and no letters on
  333. * same line.
  334. *
  335. @7 macrobegin
  336.         unmarkblock                     * get ready
  337.         begline                         * go to begline
  338.         delch                           * delete first asterisk
  339.         endline begline                 * check if anything else on line
  340.  jfalse NEXT:                           * if line blank, go to next
  341.         markcolumn                      * otherwise, mark begline
  342.         wordright                       * go to first word on line
  343.         cursorleft                      * get cursor off word
  344.         deleteblock                     * delete all space to beginline
  345.   NEXT:                                 *
  346.         cursordown                      * cursordown and end
  347. *
  348. * 17 bytes Mon  07-30-1990  11:03:26
  349.  
  350.  
  351.  
  352. * ┌────────────────────────────────────────────────────────────────────┐
  353. * │@(9) Macro To Count Words In Document, Words are letters and numbers│
  354. * └────────────────────────────────────────────────────────────────────┘
  355. * This macro counts the number of words in a document. A "word" is at
  356. * least one letter or number separated by a space or the following word
  357. * separators:
  358. *                   !@#$%^&*'()+|-=\,./;'[]<>?:"{}
  359. * If it's important to you that words be considered as "any string
  360. * separated by at least one space", macro @0 below is the macro to
  361. * use. The @9 macro counts words like "can't" as two words; @0 counts
  362. * them as one word.
  363. * Test macro using the calibrated file WORD (19 words).
  364. * -----------------------------------
  365. * @9 Macro To Count Words In Document
  366. * -----------------------------------
  367. * [ Number of WORDS in document ] = [ Number of LINES in temp file ]
  368. *
  369. @9   Macrobegin                         *
  370. *----Be sure last line is blank---------*
  371.      endfile begline                    * Check for blank line at end
  372.      jfalse START: addline              * If last line is NOT blank,
  373.                                         * test fails, then addline
  374. *----Copy Words to Scratch Buffer-------*
  375.  START: begfile insertline              * Insert blank line at top to
  376.                                         * be sure to find first word
  377.      wordright markword                 * Mark first word
  378.      cursorup delline                   * Delete blank line
  379.      storescrbuff "1" return            * Store word to scratch buffer
  380.  COUNT: cursordown                      * Check if on last line
  381.      jfalse GETCOUNT: cursorup          * If can't cursor down, must
  382.                                         * be on last line, go to
  383.                                         * GETCOUNT, or cursorup
  384.                                         *ELSE
  385.      WordRight MarkWord                 * Move to next word and mark it
  386.      jfalse COUNT:                      * If at endline, no word exists
  387.                                         * so COUNT again
  388.                                         *ELSE
  389.      appendscrbuff "1" return           * Append word to scratch
  390.      jump COUNT:                        * and go-to COUNT again
  391. *----Get Word Count---------------------*
  392.  GETCOUNT: editfile "!" return quit     * Quit temp file
  393.      editfile return                    * Load temp file to count words
  394.      getscrbuff "1" return              * Make list of words
  395.      unmarkblock endfile                * WORD COUNT = # LINES
  396. *
  397. * 50 bytes Sat  10-13-1990  03:18:33
  398.  
  399.  
  400.  
  401. * ┌─────────────────────────────────────────────────────────────┐
  402. * │@(0) Counts words in a document, words separated by spaces   │
  403. * └─────────────────────────────────────────────────────────────┘
  404. * @0 differs from @9 in that a "word" with @0 is considered any string
  405. * separated by at least one space. @9 macro considers a "word" to be at
  406. * least one letter or number separated by a space or the following word
  407. * separators: !@#$%^&*'()+|-=\,./;'[]<>?:"{} ... @9 counts words like
  408. * "can't" as two words; @0 counts them as one word.
  409. *
  410. * @0 is a little longer and slower than @9, but if it's important to
  411. * you that words be considered as "any string separated by at least
  412. * one space", this is the macro to use.
  413. * Test macro using the calibrated file WORD (46 words).
  414. * -----------------------------------
  415. * @0 Macro To Count Words In Document
  416. * -----------------------------------
  417. * [ Number of WORDS in document ] = [ Number of LINES in temp file ]
  418. *
  419. @0 Macrobegin
  420. *----Toggle Insert ON-------------------*
  421.         insertline "a" cursorleft "a"   * Insert test line
  422.         endline jtrue WASON:            * If not at endline-Insert is ON
  423.         toggleinsert Jump WASOFF:       * Or Insert is off-toggle ON
  424.  WASON:  cursorleft                     * Clean up cursor movement
  425.  WASOFF: cursorleft delline             * Clean up cursor movement
  426. *----Copy Document to Temp File---------*
  427.         BegFile markblockbegin          * Mark document
  428.         EndFile markblockend            *
  429.         editfile "!" return             * Load temp file
  430.         killfile quit editfile return   * Kill/quit/load temp file
  431.         copyblock unmarkblock           * Copy doc to temp file
  432.         endfile addline begfile         * Add blank line at end
  433. *----Split Words One Word Per Line------*
  434.  COUNT1: Find " " Return  Return        * Find first space
  435.  COUNT2: Return                         * Put next word on next line
  436.  NOSPACE: CursorDown                    * Move down to next line
  437.         jfalse DELBLANKLINES:           * If can't move down must be
  438.                                         * on last line, then begin to
  439.                                         * delete all blank lines
  440.         cursorup                        * Move back up one line
  441.         repeatfind                      * Find another space
  442.         jTrue COUNT2:                   * Put next word on next line
  443. *----Delete Blank Lines-----------------*
  444.  DELBLANKLINES: begfile                 * Get to begin of file
  445.  CHK4BLANK: endline begline             * Check if line has text
  446.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  447.         delline                         * Or line is blank, delete it
  448.         jtrue CHK4BLANK:                * Go check next line
  449.  NOTBLANK: endpara                      *ELSE  Move to pargraph end
  450.         cursordown                      * Move down to next line
  451.         jfalse GETCOUNT:                * If on last line, GETCOUNT
  452.         jump CHK4BLANK:                 * If not, check for more blank lines
  453. *----Get Word Count---------------------*
  454.  GETCOUNT: findreplace " " return "|"   * Remove all extra spaces
  455.         backspace return "GN" return    *
  456.         makebotofscreen                 * WORD COUNT = # LINES
  457. *
  458. * 89 bytes Sat  10-13-1990  02:44:52
  459. * 85 bytes Mon  10-15-1990  21:58:35
  460.  
  461.  
  462.  
  463.  
  464.  
  465. * ┌────────────────────────────────────────────────────────┐
  466. * │@(n) Counts the number of characters in a document      │
  467. * └────────────────────────────────────────────────────────┘
  468. * This macro counts the number of characters in a document. After
  469. * running, the byte size of a modified document file with all spaces
  470. * removed is shown in col. 1 on the last line. Subtract 2 x number of
  471. * lines from the byte size to get the number of characters.
  472. * Test macro using the calibrated file WORD (138 -2 x 6 = 126 chars.)
  473. * ----------------------------------------------------
  474. * @n Macro To Count Number Of Characters In A Document
  475. * ----------------------------------------------------
  476. @n Macrobegin
  477. *----Copy Document to Temp File---------*
  478.         BegFile markblockbegin          * Mark document
  479.         EndFile markblockend            *
  480.         editfile "!" return             * Load temp file
  481.         killfile quit editfile return   * Kill/quit/load temp file
  482.         copyblock unmarkblock           * Copy doc to temp file
  483. *----Remove All Spaces------------------*
  484.         findreplace " " return "|"      * Remove single space globally
  485.         backspace return "GN" return    *
  486. *----Delete Blank Lines-----------------*
  487.  DELBLANKLINES: begfile                 * Get to begin of file
  488.  CHK4BLANK: endline begline             * Check if line has text
  489.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  490.         delline                         * Or line is blank, delete it
  491.         jtrue CHK4BLANK:                * Go check next line
  492.  NOTBLANK: endpara                      *ELSE  Move to pargraph end
  493.         cursordown                      * Move down to next line
  494.         jfalse GETCOUNT:                * If on last line, GETCOUNT
  495.         jump CHK4BLANK:                 * If not, check for more blank lines
  496. *----Get Number of Characters-----------*
  497.  GETCOUNT:                              *
  498.         savefile                        * Save tmmp file to get size
  499.         DOS "dir " currentfilename      * Get size with Dir
  500.         ">c:$" return return            * Save DIR list to temp c:$
  501.         editfile "c:$" return           * Load DIR listing of temp file
  502.         gotoline "4" return             * Drop down to file line
  503.         wordright markword copy         * Get size to scrap
  504.         killfile quit                   * Kill/quit c:$
  505.         editfile "!" return killfile    * Load & kill temp file
  506.         begline paste makebotofscreen   * Character Count = Byte Size
  507.                                         *   minus 2 x Number of Lines
  508. * 95 bytes Sat  10-13-1990  11:27:13
  509.  
  510.  
  511.  
  512.  
  513. * ┌─────────────────────────────────────────────────────────────────────┐
  514. * │^(3_) Formats a paragraph.  (Macro has been around a long time)      │
  515. * └─────────────────────────────────────────────────────────────────────┘
  516. *
  517. 04 macrobegin
  518.         cursordown                      * move down one line
  519.         prevpara                        * get to beginning of paragraph
  520.         wrappara                        * reformat
  521.         nextpara                        * go to begin next paragraph
  522. *
  523. * 8 bytes Wed  08-01-1990  10:47:36
  524.  
  525.  
  526.  
  527.  
  528. * ┌─────────────────────────────────────────────────────────────────────┐
  529. * │^(5_) Formats complete document with blank lines forming paragraphs  │
  530. * └─────────────────────────────────────────────────────────────────────┘
  531. *
  532. 06 MacroBegin
  533.         unmarkblock                     * unmark
  534.         begfile                         * get to file begin
  535.         setrmargin "69" return          * set new right margin
  536.    FORMAT:                              *
  537.    jfalse FINISH:                       * no more para? go to FINISH
  538.         WrapPara                        * reformat
  539.         NextPara                        * get to begin next paragraph
  540.    jump FORMAT:                         *
  541.    FINISH:                              * no more paragraphs
  542.         setrmargin "80" return          * reset right margin
  543. *
  544. * 26 bytes Wed  09-12-1990  16:47:
  545.  
  546.  
  547. *┌─────────────────────────────────────┐
  548. *│^(7_) Format Message Reader Paragraph│
  549. *└─────────────────────────────────────┘
  550. * Here's a handy macro from Tim Farley of SemWare to reformat a message
  551. * reader paragraph. Remember, paragraphs are reformated to the width
  552. * of the right margin setting, so set as needed.
  553. *
  554. * ==============================================================================
  555. * Date: 10-01-90 (19:09)           Number: 3041         SemWare Support BBS
  556. *   To: DAN SNAPPER                Refer#: 3028
  557. * From: TIM FARLEY                   Read: YES
  558. * Subj: Message reformat macro       Conf: (21) ILink
  559. * ------------------------------------------------------------------------
  560. * DS>   Does anyone have a macro to reformat a quoted 'off-line'
  561. * DS>   message paragraph and then reinsert the quotes back?
  562. * DS>
  563. * DS>
  564. * DS>
  565. *
  566. * Here it is:
  567. *
  568. *
  569. * Reader Paragraph Reform
  570. *   Mark a line block, hit this key, and it will reform the text, leaving
  571. *   all "II>" quoting on the left alone.
  572. *
  573. *   Assumes that ">" is the last character of the "quoting" mark.
  574. *   Also assumes that WordWrap is currently on when you hit it,
  575. *   and that there is a currently marked block.
  576. *
  577.  
  578. 08   MacroBegin OneWindow
  579.      GotoBlockBeg GotoBlockEnd JTrue doit: MarkLine GotoBlockEnd
  580.    doit:
  581.      ToggleWordWrap EndLine #254 ToggleWordWrap
  582.      GotoBlockBeg GotoColumn "16" Return Find ">" Return "BL" Return
  583.      JTrue foundit:
  584.      BegLine
  585.    foundit:
  586.      CursorRight
  587.      UnmarkBlock MarkColumn Find #254 Return "N" Return
  588.      GotoColumn "512" Return MarkColumn BegLine GotoBlockBeg
  589.      Cut
  590.      MarkLine CopyBlock CopyBlock CopyBlock UnmarkBlock
  591.      HorizontalWindow EditFile "$$$$$$$$.tmp" Return
  592.      BegFile BegLine         * Top of files in case it was already here
  593.      InsertLine InsertLine   * ??
  594.      Paste UnMarkBlock       * put block in place
  595.      EndFile AddLine BegFile * mandatory blank line on end
  596.    more:
  597.      WrapPara                * wrap each para
  598.      JTrue more:             * until none left
  599.      DelLine
  600.      BegFile BegLine
  601.      Find Return Return      * find our goofy char again
  602.      DelCh                   * and delete it
  603.      GotoColumn "512" Return MarkColumn BegFile BegLine MarkColumn
  604.      Cut Quit PrevWindow OneWindow
  605.      Paste GotoBlockEnd CursorDown BegLine UnMarkBlock
  606. *
  607. * 132 bytes Tue  10-02-1990  16:51:06 (added TH)
  608.  
  609. * This macro is too long for QCONFIG, you'll have to use QMAC to
  610. * compile it.  Then put the compiled macro files in some directory,
  611. * and add the following option to the command line your reader runs
  612. * QEdit with:
  613. *
  614. *      /Ld:\dir\filename.ext
  615. *
  616. * where D:\DIR\FILENAME.EXT is the full drive, path, and name of
  617. * the compiled binary macro file.
  618. *
  619. * I've used this macro myself to reformat quotes, for over a year
  620. * now.
  621. *
  622. * --Tim Farley
  623. *   SemWare Technical Support
  624.  
  625.  
  626.  
  627.  
  628. * ┌─────────────────────────────────────────────────────────────────────┐
  629. * │^(8_) Formats QMAC txtfile block with asterisk in column 1           │
  630. * └─────────────────────────────────────────────────────────────────────┘
  631. * To run, position the 'cursor line' on the first line of the block to
  632. * reformat.  Press Ctl_8, then cursor down to bottom of block to
  633. * reformat.  To reformat, press 'Enter' when the block is marked.  This
  634. * macro differs from Ctl_9 in that the block does not include the
  635. * asterisk and blank space; in Ctl_9 the block starting position is
  636. * selected by the starting position of the cursor line.  This macro also
  637. * differs from Ctl_0 which formats a paragraph from first blank line
  638. * which has no text or asterisk on line to last blank line.
  639. *
  640. *
  641. 09 macrobegin
  642.         unmarkblock                     * get ready
  643.         gotocolumn "512" return         * get all block to format
  644.         markcolumn                      * mark begin of block
  645.                 begline                 * start at line begin
  646.                 wordright               * get to first word on line
  647.         cursordown                      * position to cursor down
  648.         makectrofscreen                 * see better
  649.         pause                           * cursor to end, then 'Enter'
  650.         markcolumn                      * mark end of block
  651.         gotoblockbeg                    * Get to block begin
  652.  JFalse END:                            * No block? End
  653.         cut                             * Get into scrap
  654.         editfile "C:$" return           * load C:$ (temp file)
  655.         paste                           * paste block to C:$
  656.         setrmargin "69" return **       * set rt margin to 69
  657.                                         ** change "69" as needed
  658.         wrappara                        * format block
  659.         setrmargin "80" return          * reset rt margin to 80
  660.         begfile                         * get to block begin
  661.         markcolumn                      * mark
  662.         endfile                         * mark endblock
  663.         gotocolumn "69" return **       * get all block marked
  664.                                         ** change "65" as needed
  665.         copy                            * get formatted block to scrap
  666.         killfile quit                   * kill/quit C:$
  667.         pasteover                       * Put back formatted, marked
  668.         makectrofscreen                 * better view
  669.  END:
  670. *
  671. * 61 bytes Tue  09-11-1990  19:21:48
  672.  
  673.  
  674.  
  675.  
  676. * ┌─────────────────────────────────────────────────────────────────────┐
  677. * │^(9_) Formats Block.  Must position cursor at beginning of block     │
  678. * └─────────────────────────────────────────────────────────────────────┘
  679. * To run, position the 'cursor' at the beginning of the block to
  680. * reformat.  Press Ctl_9, then cursor down to bottom of block to
  681. * reformat.  Press 'Enter' when the block is marked.  This macro differs
  682. * from Ctl_8 in that the starting position of the block to be
  683. * reformatted is selected by the starting position of the cursor; in
  684. * Ctl_8 the block starting POSITION is selected by the starting
  685. * position of the cursor line.
  686. *
  687. *
  688. 10 macrobegin
  689.         unmarkblock                     * get ready
  690.         gotocolumn "512" return         * get all block to format
  691.         markcolumn                      * mark begin of block
  692.         prevposition                    *
  693.         begline                         *
  694.         prevposition                    *
  695.         makectrofscreen                 * see better
  696.         cursordown                      * position to cursor down
  697.         pause                           * cursor to end, then 'Enter'
  698.         markcolumn                      * mark end of block
  699.         gotoblockbeg                    * Get to block begin
  700.  JFalse END:                            * No block? End
  701.         cut                             * Get into scrap
  702.         editfile "C:$" return           * load C:$ (temp file)
  703.         paste                           * paste block to C:$
  704.         setrmargin "69" return **       * set rt margin to 69
  705.                                         ** change "69" as needed
  706.         wrappara                        * format block
  707.         setrmargin "80" return          * reset rt margin to 80
  708.         begfile                         * get to block begin
  709.         markcolumn                      * mark
  710.         endfile                         * mark endblock
  711.         gotocolumn "69" return **       * get all block marked
  712.                                         ** change "69" as needed
  713.         copy                            * get formatted block to scrap
  714.         killfile quit                   * kill/quit C:$
  715.         pasteover                       * Put back formatted, marked
  716.         makectrofscreen                 * better view
  717.  END:
  718. *
  719. * 62 bytes Tue  09-11-1990  19:09:31
  720.  
  721. *        This is a test block.  To format, place the "cursor" on "t" in
  722. *               in "this" on line 1.  Then press Ctl_9 and cursor down to
  723. *               block end.  When the block has been marked press
  724. *               'Enter'.
  725. *               Asterisks need not be removed.
  726.  
  727.  
  728.  
  729.  
  730. * ┌─────────────────────────────────────────────────────────────────────┐
  731. * │^(0_) Formats Paragraph Only.  Keeps in original indented position   │
  732. * └─────────────────────────────────────────────────────────────────────┘
  733.  
  734. * To run, place cursor line anywhere in a paragraph, and press Ctl_0.
  735. * This macro yields the same formatted paragraph as does Ctl_3 if
  736. * the right margin is set to 69 in the QEdit menu or in QCONFIG.DAT.
  737. * This macro is the starting point for putting together macros Ctl_8
  738. * and 9.  If there are asterisks in column 1 they are also formatted as
  739. * part of the paragraph.
  740.  
  741. 11 macrobegin
  742.         unmarkblock                     * get ready
  743.         cursordown                      * get into paragraph
  744.         prevpara                        * get to paragraph begin
  745.         markcolumn                      * mark column
  746.         endpara                         * get to paragraph end
  747.         gotocolumn "512" return         * get all paragraph in block
  748.         markcolumn                      * mark paragraph
  749.         gotoblockbeg                    * Get to paragraph begin
  750.  JFalse END:                            * No block? End
  751.         cut                             * Get into scrap
  752.         editfile "C:$" return           * load C:$ (temp file)
  753.         paste                           * paste block to C:$
  754.         setrmargin "69" return **       * set rt margin to 69
  755.                                         ** change "69" as needed
  756.         wrappara                        * format block
  757.         setrmargin "80" return          * set rt margin to 80
  758.         begfile                         * get to block begin
  759.         markcolumn                      * mark
  760.         endfile                         * mark end block
  761.         gotocolumn "69" return **       * get all block marked
  762.                                         ** change "69" as needed
  763.         copy                            * get formatted block to scrap
  764.         killfile quit                   * kill/quit C:$
  765.         paste                           * Put back formatted, marked
  766. *         pasteover                       * Put back formatted, marked
  767.         begline
  768.         makectrofscreen                 * better view
  769.  END:
  770. *
  771. * 60 bytes Tue  09-11-1990  19:12:08
  772.  
  773.  
  774. *****************************TEST PARAGRAPH************************************
  775.  
  776.        This is a (test) paragraph.
  777.                 Place the cursor line anywhere in this paragraph to run.
  778.                 Press Ctl and 0 at the same time.
  779.                 Be sure AutoIndent is ON.  (Long line for test )==>>>>>>>>>>>>>> ***************************************** ***************************************** ***************************************** ***************************************** ***************************************** *****************************************
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. ******************************TEST PARAGRAPH***********************************
  787.  
  788. *┌───────────────────────────────────────────────────────────────────┐
  789. *│@(h) Finds first word on cursor line marked in document below      │
  790. *└───────────────────────────────────────────────────────────────────┘
  791. *
  792. *        @h macro has 2 steps:
  793. *
  794. *        1.  Press @ and h at the same time.  An ! shows at the
  795. *        end of the top line.  Cursor down to desired line in Index.
  796. *
  797. *        2.  Press Enter.  The macro first erases the !, and
  798. *        then finds the first word on the cursor line in the document
  799. *        below marked with (...).
  800. *
  801. * See BOOK15.QM for more details.
  802. *
  803. @h macrobegin
  804.         unmarkblock                     * unmark any marked blocks
  805.         begfile endline                 * go to file begin endline
  806.         "!"                             * put ! at endline
  807.         begline
  808.         find "!" return return begline  * highlight !
  809.         pause                           * pause for Index selection
  810.         wordright markword              * mark first word on line
  811.         copy                            * copy word to scrap buffer
  812.         begfile                         * begfile
  813.         find "!" return return delch    * find & delete !
  814.         endpara                         * go to end of Index
  815.         makectrofscreen                 * cursor line center of window
  816.         find "(" paste ")"
  817.         return "I" return               * find first marked word in doc
  818.  jfalse NOMARK:
  819.         begline                         * if mark found go to begline
  820.  jump END:
  821.  NOMARK:
  822.         begfile                         * if no mark found go to begfile
  823.  END:
  824. *
  825. * 47 bytes Fri  09-14-1990  14:06:26
  826.  
  827.  
  828.  
  829. *┌───────────────────────────────────────────────────────────────────┐
  830. *│ @(F1) Right Justify to file with same prefix, ".rj" extension     │
  831. *└───────────────────────────────────────────────────────────────────┘
  832. * Macros @F1 and @F2 use the right justification program RJ.COM which is
  833. * included and must be located in current directory or path. See below
  834. * for documentation of RJ.COM.
  835. *
  836. @F1 macrobegin
  837.         savefile unmarkblock begfile    *
  838.         insertline begline dropanchor   * Start mark
  839.         currentfilename                 * Get currentfilename
  840.         find "." return  "B" return     * Find dot back
  841.         jtrue IFEXT:                    * If dot found go to IFEXT:
  842.         endline ".rj"                   * add ".rj" if name has NO ext
  843.         jump FULLEXT:                   * Go to FULLEXT
  844.  IFEXT:                                 * If name has extension then..
  845.         cursorright deltoeol "rj"       * add "rj" after dot
  846.  FULLEXT:                               *
  847.         cut                             *
  848.         DOS "RJ " currentfilename       * Right justify file
  849.         ">" Paste return return         *
  850.         editfile paste return quit      *
  851.         editfile return                 * Load justified file
  852.  FIRSTWORD:                             * FIRSTWORD loop removes right
  853.                                         * justification from last line
  854.                                         * of paragraph, often neater!
  855.         EndPara begline                 * Get to end of paragraph
  856.         shiftright wordright            * Put cursor on start of first
  857.         shiftleft cursorleft            * word on line
  858.         markcolumn endline markcolumn   * Marks from first word to eol
  859.         makebotofscreen
  860.         FindReplace "    " Return " " Return "LN" Return begline
  861.         FindReplace "   "  Return " " Return "LN" Return begline
  862.         FindReplace "  "   Return " " Return "LN" Return
  863.         Unmarkblock
  864.         NextPara                        * Get to begin next paragraph
  865.         jfalse FINISH:                  * No more para? go to FINISH
  866.  jump FIRSTWORD:                        * and to last line
  867.  FINISH:                                * No more paragraphs
  868.         begfile
  869. *
  870. * 126 bytes Tue  12-04-1990  20:55:28
  871.  
  872. * ......................Documentation for RJ.COM...................
  873. *
  874. *                                 RJ.COM
  875. *
  876. *  USAGE: RJ <INFILE> { PRINT_MARGIN F S }
  877. *
  878. *  WHERE: 0=< PRINT_MARGIN =<40              Default = 0   enter like: 8
  879. *   F FILTERS control chars                  Default = OFF enter like: F
  880. *   S SUPPRESS Line Feeds after CR           Default = OFF enter like: S
  881. *
  882. *  PURPOSE:  RJ  Right Justifies  your  printer output,  making  it look
  883. * professional.  RJ  right  justifies  text  files  by  imbedding blanks
  884. * between  words. It  is compatible  with  VDE or  any other  ASCII text
  885. * editor. Public domain.
  886. *
  887. *  METHOD: RJ  imbeds spaces  between words.  It calculates  the longest
  888. * line in the  file (40 to  255 char), then  justifies shorter lines (up
  889. * to  15%  shorter ). Non-printable  control characters  are not counted
  890. * for  formatting  purposes, so  leave  them  in if  you  wish. Carriage
  891. * Returns,  Line  Feeds,  Form  Feeds,  and  Tabs  are  always processed
  892. * normally  and  printed. Indenting  at  the  beginning of  the  line is
  893. * disregarded, but any  line with 3+  IMBEDDED spaces, or  any line with
  894. * Tabs is not justified. This leaves tables, charts, etc. intact.
  895. *
  896. *   HINTS: All  parameters except  INFILE are  optional and  they may be
  897. * entered in any order; the defaults are above. Note that the input file
  898. * is left unalterd;  output defaults to  the screen. This  allows you to
  899. * preview your  printer output.  To print  or copy  your right justified
  900. * file, use the DOS redirection operator: RJ REPORT.TXT  F 6 > PRN. Save
  901. * your normal parameters in a batch file.
  902.  
  903.  
  904.  
  905.  
  906. *┌──────────────────────────────────────────┐
  907. *│ @(F2) Right Justify, screen preview      │
  908. *└──────────────────────────────────────────┘
  909. * Macros @F1 and @F2 use the right justification program RJ.COM which is
  910. * included and must be located in current directory or path. See above
  911. * for documentation of RJ.COM.
  912. *
  913. @f2 macrobegin
  914.         savefile
  915.         DOS "RJ " currentfilename return
  916. *
  917. * 14 bytes Sun  12-02-1990  01:02:50
  918.  
  919.  
  920.  
  921. *┌───────────────────────────────────────────────────────────────────┐
  922. *│@(F4) Removes Right Justification from line or block               │
  923. *└───────────────────────────────────────────────────────────────────┘
  924. * Position cursor on first line to be un-justified, press @F4, then
  925. * cursor down to last line to be un-justified, and press <Enter>.
  926. * If cursor is between paragraphs, cursor is automatically placed on the
  927. * first word of the next paragraph.
  928. *
  929. @f4 macrobegin
  930.         unmarkblock
  931.  START:
  932.         endline begline                 * Test if line not blank
  933.         jtrue FIRSTWORD:                * If not blank, goto FIRSTWORD
  934.         wordright                       * If blank, goto first word
  935.         jump START:                     * and check for blank line again
  936.  FIRSTWORD:                             *
  937.         shiftright wordright            * Put cursor on start of first
  938.         shiftleft cursorleft            * word on line,
  939.         gotocolumn "512" return         * Get all line to un-justify
  940.         markcolumn prevposition         * Mark column at first word
  941.         begline                         * Reposition screen
  942.         jfalse NEXT:                    * If first word in col. 1,
  943.                                         * test is false, go to NEXT
  944.         prevposition                    * Otherwise, back to first word
  945.  NEXT:
  946.         pause                           * Pause to cursor to last line
  947.         markcolumn                      * Mark end of block
  948.         gotoblockbeg                    * Get to block begin
  949.         FindReplace "    " Return " " Return "LN" Return
  950.         FindReplace "   "  Return " " Return "LN" Return
  951.         FindReplace "  "   Return " " Return "LN" Return
  952.         Unmarkblock                     *
  953.         nextpara                        *
  954.         makectrofscreen                 *
  955. *
  956. * 87 bytes Fri  12-07-1990  12:32:09
  957.  
  958.  
  959.  
  960. *┌───────────────────────────────────────────────────────────────────┐
  961. *│ @(F5) Removes Right Justification from DOCUMENT                   │
  962. *└───────────────────────────────────────────────────────────────────┘
  963. *
  964. @f5 macrobegin
  965.         begfile unmarkblock             *
  966.  START:                                 *
  967.         endline begline                 * Test if line not blank
  968.         jtrue FIRSTWORD:                * If so, goto FIRSTWORD
  969.         wordright                       * If not, move to first word
  970.         jump START:                     * and check for blank line again
  971.  FIRSTWORD:                             * FIRSTWORD loop removes right
  972.                                         * justification from paragraph
  973.         begline
  974.         shiftright wordright            * Put cursor on start of first
  975.         shiftleft cursorleft            * word on line,
  976.         markcolumn endpara              * and start column mark
  977.         gotocolumn "512" return         * Be sure to get all para in block
  978.         markcolumn                      * Mark para as block
  979.         begline makebotofscreen
  980.         FindReplace "    " Return " " Return "LNB" Return
  981.         FindReplace "   "  Return " " Return "LNB" Return
  982.         FindReplace "  "   Return " " Return "LNB" Return
  983.         Unmarkblock
  984.         NextPara                        * Get to begin next paragraph
  985.         jfalse FINISH:                  * No more para? go to FINISH
  986.  jump FIRSTWORD:                        * and to last line
  987.    FINISH:                              * No more paragraphs
  988.         begfile
  989. *
  990. * 96 bytes Wed  12-05-1990  10:42:45
  991.  
  992.  
  993.  
  994. * ┌─────────────────────────────────────────────┐
  995. * │@(F7) Deletes ALL BLANK lines in document    │
  996. * └─────────────────────────────────────────────┘
  997. *
  998. @F7 macrobegin
  999.         begfile                         * Go to bof
  1000.  CHK4BLANK:                             *
  1001.         endline begline                 * Check if line has text
  1002.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  1003.         delline                         * Or line is blank, delete it
  1004.         jtrue CHK4BLANK:                * Go check next line
  1005.  NOTBLANK:                              *ELSE
  1006.         endpara                         * Move to pargraph end
  1007.         cursordown                      * Move down to next line
  1008.         jfalse END:                     * If on last line, END macro
  1009.         jump CHK4BLANK:                 * If not, check for more blank lines
  1010.  END:                                   *
  1011.         begfile                         * Go to bof
  1012. *
  1013. * 23 bytes Thu  10-11-1990  20:59:17
  1014.  
  1015.  
  1016.  
  1017.  
  1018. * ┌────────────────────────────────────────────────────────────────┐
  1019. * │@(F8) Deletes all blank lines but single space in documnent     │
  1020. * └────────────────────────────────────────────────────────────────┘
  1021. * Puts first non-blank line on top.
  1022. *
  1023. @F8 macrobegin
  1024.         begfile                         * Go to bof
  1025.  CHK4BLANK:                             *
  1026.         endline begline                 * Check if line has text
  1027.         jtrue  NOTBLANK:                * If so, go to NOTBLANK
  1028.         delline                         * Or line is blank, delete it
  1029.         jtrue CHK4BLANK:                * Go check next line
  1030.  NOTBLANK:                              *ELSE
  1031.         endpara                         * Move to pargraph end
  1032.         cursordown                      * Move down to next line
  1033.         cursordown                      * Move down to next line
  1034.         jfalse END:                     * If on last line, END macro
  1035.         jump CHK4BLANK:                 * If not, check for more blank lines
  1036.  END:                                   *
  1037.         begfile                         * Go to bof
  1038. *
  1039. * 24 bytes Thu  10-11-1990  21:12:50
  1040.  
  1041.  
  1042.  
  1043.  
  1044. * ==============================================================================
  1045. * Date: 10-10-90 (11:44)           Number: 10442        SemWare Support BBS
  1046. *   To: ALL                        Refer#: NONE
  1047. * From: SAMMY MITCHELL               Read: NO
  1048. * Subj: MACROS                       Conf: (0) Main Board
  1049. * ------------------------------------------------------------------------
  1050. * We (SemWare) have been asked on many occasions how to change the CR/LF
  1051. * characters at EOF to something else.  In most instances, the task that
  1052. * the user wanted to accomplish could be done in another way.  For
  1053. * example, we've had many requests to convert a mailing list file to a
  1054. * comma delimited file for import into a database.  Here are some example
  1055. * macros to make a comma delimited file, and convert a comma delimited
  1056. * file back to its original format.  These macros will have to be
  1057. * compiled with Qmac, as they are too large for Qconfig.  I do hope that
  1058. * this helps someone!
  1059. *
  1060. *  (Key assignements changed TH    Wed  10-10-1990  )
  1061. * ---------------------------------------------------------------------
  1062. * ^(F9_) Macro to make a comma delimited file from a file of the format:
  1063. * ---------------------------------------------------------------------
  1064. * record 1
  1065. * record 2
  1066. * record n
  1067. *
  1068. * Each group of name/address must be followed by at least one blank
  1069. * line.
  1070.  
  1071. ^F9 MacroBegin
  1072.         BegFile                         * make sure at top
  1073.   while1:
  1074.         BegLine EndLine jTrue while2:   * break out if non empty line
  1075.         DelLine                         * delete the blank line
  1076.         CursorDown jFalse macroexit:    * exit macro if eof
  1077.         CursorUp                        * back up to the line to test
  1078.         jump while1:                    * keep looping while blank
  1079. * nonblank line found - see if next line is nonblank also
  1080.   while2:
  1081.         cursorDown jFalse macroexit:    * exit macro if eof
  1082.         BegLine EndLine jFalse while1:  * if blank line, start over
  1083.         CursorUp EndLine "," JoinLine   * join the next line
  1084.         jump while2:                    * and keep on until blank
  1085.   macroexit:
  1086.         BegFile                         * show user bof
  1087. *
  1088. * 37 bytes Wed  10-10-1990  22:16:45 (line added TH)
  1089.  
  1090.  
  1091.  
  1092.  
  1093. * ---------------------------------------------------------------------
  1094. * ^(F10_) Macro to "break apart" a comma delimited file, as created from
  1095. *       the ^F9  macro above.
  1096. * ---------------------------------------------------------------------
  1097.  
  1098. ^f10 MacroBegin
  1099.         BegFile                         * start at bof
  1100.   find_first_comma:
  1101.         Find "," Return "" Return       * find first comma
  1102.         jFalse macroexit:               * exit if none
  1103.   makeline:
  1104.         UnMarkBlock
  1105.         DelCh                           * delete the ','
  1106.         SplitLine                       * split the line
  1107.         CursorDown                      * next line
  1108.         BegLine                         * column 1
  1109. * remove leading blanks
  1110.   delete_blanks:
  1111.         UnMarkBlock
  1112.         DropAnchor
  1113.         Find " " Return "GL" Return     * blank found?
  1114.         jFalse continue                 * no, continue
  1115.         DelCh                           * delete it
  1116.         jump delete_blanks:             * and try again
  1117.   continue:
  1118.         UnMarkBlock
  1119.         MarkLine                        * look for next  ,' on line
  1120.         Find "," Return "L" Return      *
  1121.         jTrue makeline:                 * split if found
  1122.         UnMarkBlock
  1123.         AddLine                         * otherwise, add a blank line
  1124.         jump find_first_comma:          * and look for another ','
  1125.   macroexit:
  1126.         BegFile                         * show user bof
  1127. *
  1128. * 54 bytes Wed  10-10-1990  22:17:04 (line added TH)
  1129. *
  1130. * That's all, folks!
  1131.  
  1132.  
  1133.  
  1134. * ┌───────────────────────────────────────────────────────────────────┐
  1135. * │^(b) Replace "period space" w/ "period space space" - PARAGRAPH    │
  1136. * └───────────────────────────────────────────────────────────────────┘
  1137. * This macro was written by Tim Farley of SemWare.
  1138. *
  1139. * =========================================================================
  1140. * Date: 01-18-91 (13:59)           Number: 3433         SemWare Support BBS
  1141. *   To: BOB LONG                   Refer#: 3430
  1142. * From: TIM FARLEY                   Read: YES
  1143. * Subj: Legibility breaks            Conf: (21) ILink
  1144. * ------------------------------------------------------------------------
  1145. * BL>It had to do with retaining double spaces between sentences
  1146. * BL>even when they fall at the ends of lines and then get moved when the
  1147. * BL>paragraph is reformed.  I reinstalled 2.1, choosing the option to
  1148. * BL>retain trailing blanks, but QEdit still removes one blank.
  1149. * BL>
  1150. * BL>Is there a workaround?
  1151. *
  1152. * The only workaround I know for that one would be to encase
  1153. * WrapPara in a macro, that would mark the entire paragraph as a
  1154. * block, and do a global search and replace (limited to the block)
  1155. * to change ". " to ".  " to put the spaces back in.  Kludgy, and
  1156. * not perfect, but perhaps workable.
  1157. *
  1158. * Here's what it would look like:
  1159. *
  1160. * *
  1161. * * WrapPara modification:  retains double spacing after "." chars.
  1162. * *
  1163. ^b      MacroBegin UnmarkBlock      * we're going to be using blocks
  1164.         MarkCharacter WrapPara      * Wrap paragraph & mark rest of it
  1165.         MarkCharacter GotoBlockBeg  * Close mark & go to begin of it
  1166.         FindReplace ". " Return     * Change period with single space
  1167.         ".  " Return "LN" Return    * to one with double space.
  1168.         JFalse end:                 * None?  We're done...
  1169.         FindReplace ".   " Return   * Now fix any that ended up with 3
  1170.         ".  " Return "LN" Return    * to have just two again.
  1171.      end:
  1172.         GotoBlockEnd UnmarkBlock
  1173. *
  1174. * 54 bytes Fri  01-18-1991  21:23:45 (line added TH January 18, 1991)
  1175.  
  1176. *
  1177. * As usual, remove the comments to the right, and reformat this all on one
  1178. * line if you plan to put it in QCONFIG.DAT.
  1179. *
  1180. * --Tim Farley
  1181.  
  1182.  
  1183.  
  1184.  
  1185. * ┌──────────────────────────────────────────────────────────────────┐
  1186. * │^(c) Replace "period space" w/ "period space space" - DOCUMENT    │
  1187. * └──────────────────────────────────────────────────────────────────┘
  1188. *
  1189. *  Change "GN" to "G" for replacement with confirmation.
  1190. *
  1191. ^c      MacroBegin
  1192.         FindReplace ". "   Return ".  " Return "GN" Return
  1193.         FindReplace ".   " Return ".  " Return "GN" Return
  1194. *
  1195. *44 bytes Sat  01-19-1991  11:18:17
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204. * (VERSION) HISTORY:
  1205. *
  1206. *       1.1 - added Alt_6,7 & 8 to format QMAC txtfiles
  1207. *       1.1a- modified Alt_8,9 & 10 to get off screen-text in block
  1208. *       1.2 - added Alt_5 to format entire document QUICKLY keeping
  1209. *                         indented paragraph positions in place
  1210. *                   Alt_4 to format entire document keeping indented
  1211. *                         paragraph positions in place
  1212. *                   Alt_3 to format paragraph only
  1213. *           - modified other macros to handle line widths to 512
  1214. *       1.2a- modified this documentation
  1215. *       1.2b- Added @2 to make single column txtfile from
  1216. *             QMAC txtfile, v1.2b
  1217. *       1.2c- changed 160 in @9 to 512
  1218. *       1.2d- @2 removed, now in COLUMN10.ZIP
  1219. *           - @4 removed
  1220. *           - added killfile @0
  1221. *           - changed macro comments
  1222. *       1.3 - added Alt_1 & 2 to put asterisk and space in front
  1223. *             of blocks and paragraphs
  1224. *       1.4 - added Alt_4 to remove asterisk and space in column 1
  1225. *       1.5 - added Alt_t (from Tim Farley) to do the same as Alt_1
  1226. *           - changed key assignments
  1227. *           - added Alt_2 to remove asterisks in front of blocks
  1228. *           - shortened Alt_1 to 32 bytes
  1229. *       1.5a- modified Alt_1 to handle blocks with blank lines
  1230. *           - changed "60" in Ctl_0 to "69"
  1231. *           - Alt_t modified by Tim Farley to correctly handle column
  1232. *             and single line blocks.
  1233. *       1.5b- corrected documentation
  1234. *       1.5c- Changed file name REFORMxx to RFRMxx.
  1235. *       1.6 - Added @5.
  1236. *           - Changed ^5 and ^9 right margin to 69.
  1237. *           - Shortened ^8,9 and 0.
  1238. *       1.7 - Added @h to help locate items or macros from Index.
  1239. *           - Added @8 to have sentences end with "period space space"
  1240. *           - Added ^7 to Formats Message Reader Paragraph (Tim Farley)             132 <-new
  1241. *       1.8 - Added @9 and @0 to count number of words in a document.
  1242. *           - Added @n to count number of characters in a document.
  1243. *           - Added @F3 and @F4 to delete blank lines in documents.
  1244. *           - Added ^1/^2 to make/break-apart a comma delimited file.
  1245. *             (Written by Sammy Mitchell, SemWare)
  1246. *       1.9 - Shortened and removed redundant commands from @0.
  1247. *       2.0 - Added @F1 and @F2 to right justify documents.
  1248. *           - Added @F4 and @F5 to remove right justification.
  1249. *           - Modified documentation and added START.BAT.
  1250. *           - Changed REFORM file names to RFRM.
  1251. *           - Changed some key assignments of macros in previous version.
  1252. *       2.1 - Modified documentation (@f4 and @f5).
  1253. *       2.2 - Corrected @h Index Use instructions.
  1254. *           - Added ^b to change ". " to ".  " in PARAGRAPHS.
  1255. *           - Added ^c to change ". " to ".  " in DOCUMENTS.
  1256.  
  1257. * Tom Hogshead  Sat  01-19-1991
  1258.